<script type="text/javascript">
	$(document).ready(function(){

	});
	function check_submit()
	{
		$('#save_post').submit();
	}
	function chane_tab(value)
	{
		if(value == '1')
		{
			$('.tong_quat').toggle('slow');
			$('.du_lieu').hide();
			$('.hinh_anh').hide();
		}
		if(value == '2')
		{
			$('.tong_quat').hide();
			$('.du_lieu').toggle('slow');
			$('.hinh_anh').hide();
		}
		if(value == '3')
		{
			$('.tong_quat').hide();
			$('.du_lieu').hide();
			$('.hinh_anh').toggle('slow');
		}
	}
	
	$(function() {
		$( "#created" ).datepicker();
	});
</script>
<div>
	<div class="content_navigation">
		<div class="content_post_title pt14">
			<div class="button left" onclick='location.href="<?=base_url().'index.php/admin/'.$module.'/'?>"'>Back</div>
		</div>
		<div class="content_post_action pt14">
			<div class="button left" onclick="return check_submit();">Save</div> 
			<div class="button left" onclick="location.href='<?=base_url().'index.php/admin/'.$module.'/save_exit'?>'">Save & Exit</div>
			<div class="button left" onclick="location.href='<?=base_url().'index.php/admin/'.$module.'/'?>'">Cancel</div>
		</div>
		<div class="clearAll"></div>
	</div>
	<div class="content_main_box">
		<form action="<?=base_url().'index.php/admin/'.$module.'/save'?>" method="POST" enctype="multipart/form-data" name="save_post" id="save_post">
		<input type="hidden" name="hidden_id" value="<?=!empty($result['id'])?$result['id']:0?>" />
		<!-- BEGIN tổng quát -->
		<div class="tong_quat">
			<div class="content_main_content">
				<div class="wrap_box_input">
					<div class="wrap_text">Status:</div>
					<div class="wrap_input">
						<input type="checkbox" name="status" id="status" class="mt11" 
						<?php if(isset($result['status'])){if($result['status'] == 1){?> checked="checked" <?php }}else{?> checked="checked" <?php } ?>/>			   	   
					</div>
					<div class="clearAll"></div>
				</div>
				<div class="wrap_box_input">
					<div class="wrap_text">Parent id:</div>
					<div class="wrap_input">
						<input type="text" name="parent_id" id="parent_id" class="input mt3" value="<?=!empty($result['parent_id'])?$result['parent_id']:''?>" placeholder="Cho biết có phải menu con hay không."/>	
					</div>
					<div class="clearall"></div>
				</div>
				<div class="wrap_box_input">
					<div class="wrap_text">Name:</div>
					<div class="wrap_input">
						<input placeholder="Tên của menu." type="text" name="name" id="name" class="input mt3" value="<?=!empty($result['name'])?$result['name']:''?>"/>				
					</div>
					<div class="clearAll"></div>
				</div>
				<div class="wrap_box_input">
					<div class="wrap_text">Link:</div>
					<div class="wrap_input">
						<input placeholder="Link của menu." type="text" name="link" id="link" class="input mt3" value="<?=!empty($result['link'])?$result['link']:''?>"/>				
					</div>
					<div class="clearAll"></div>
				</div>
				<div class="wrap_box_input">
					<div class="wrap_text">Slug:</div>
					<div class="wrap_input">
						<input placeholder="Tên đẹp." type="text" name="slug" id="slug" class="input mt3" value="<?=!empty($result['slug'])?$result['slug']:''?>"/>				
					</div>
					<div class="clearAll"></div>
				</div>
				<div class="wrap_box_input">
					<div class="wrap_text">Order:</div>
					<div class="wrap_input">
						<input placeholder="Sắp xếp thứ tự xuất hiện." type="text" name="order" id="order" class="input mt3" value="<?=!empty($result['order'])?$result['order']:''?>"/>		
					</div>
					<div class="clearAll"></div>
				</div>
			</div>
		</div>
		<!-- END Tổng quát -->
		</form>
	</div>
</div>